package cn.getech.data.development.controller.bigdata;

import cn.getech.data.development.model.dto.AlgorithmDevelopmentRerunBigDataDto;
import cn.getech.data.development.service.IDataAssetsModelService;
import cn.getech.data.intelligence.common.utils.R;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/dataAssetsModel")
@Slf4j
public class AlgorithmApiController {
    @Autowired
    IDataAssetsModelService iDataAssetsModelService;

    /**
     * 获取所有的配置类别
     */
    @ApiOperation("返回大数据算法开发的字段")
    @GetMapping("/backAlgorithmParam")
    public R returnAlgorithmDevData(Integer jobNodeId, Integer modelId){
        AlgorithmDevelopmentRerunBigDataDto algorithmDevelopmentRerunBigDataDto = iDataAssetsModelService.returnAlgorithmDevDataToBigData(jobNodeId,modelId);
        return R.okWithData(algorithmDevelopmentRerunBigDataDto);
    }
}
